home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Tech Arsenal 1
/
Tech Arsenal (Arsenal Computer).ISO
/
tek-01
/
jjbqc.zip
/
JJBSHOW1.C
< prev
next >
Wrap
C/C++ Source or Header
|
1993-01-04
|
7KB
|
154 lines
/****************************************************************************
* *
* JJBSHOW1.C *
* *
* Copyright (c) 1989, JJB. All rights reserved. *
* *
* *
* This example shows the Quick C programmer the basic concepts of JJB. *
* Just glance at it and move on to example JJBSHOW2.C. *
* *
* If you want to run this program, from DOS: *
* *
* Enter 'JJBS1' ( to load this file with JJB.QLB) *
* Press 'F5' ( to compile and begin executing) *
* *
* If you have any problems, see JJBREAD.ME 'problems'. *
* Otherwise you should be executing this program after pressing F5. *
* *
* The screen you will see is similiar to Quick C. *
* Ignore the 'not yet assigned' message. *
* *
* You may press 'ALT' and select an option. *
* The option selected is displayed in the bottom left of screen. *
* *
* Quick C is a trademark of Microsoft Corp. *
* JJB, 9236 church Rd suite 1082, Dallas, Tx 75231 (214) 341-1635 *
****************************************************************************/
/****************************************************************************
* *
* To make the .exe file JJBSHOW1.EXE for this program, from DOS enter: *
* *
* QCL /c /AM JJBSHOW1.C *
* LINK JJBSHOW1.OBJ + JJB.OBJ,,, C:LIB\, *
* *
***************************************************************************/
/* see JJBGLOSS.DOC for an additional explanation of the functions below. */
#include "c:\bin\jjbset.h"
main()
{
jjb_initalize(); /* initalizes all JJB arrays & video */
jjb_setup(); /* setup options & assign functions */
jjb_start(); /* start executing the default option */
}
/****************************************************************************
* *
* jjb_setup() *
* *
* jjb_setup() is where you define how your pull down menus will look *
* for for each group and option. *
* *
* This example shows you how to begin. *
* *
* The string descriptions have no meaning. *
* You may change them to any description you wish. *
* *
* Notice how easily you can assign function keys F2 thru F8. *
* *
* You may have up to 10 groups and 50 total options. *
* Any one group can have any number of options. *
* *
* 'group(' starts a new group of options. *
* 'option(' starts an option. *
* ' ' lets you specify any keypress for the options. *
* Otherwise JJB will use the first, second, or third letter. *
* ',DRAWLINE' can be used to separate an option. *
* 'default_opt()' tells JJB to start with and default to this option *
* *
****************************************************************************/
/* JJB CAN BE USED FOR ANY APPLICATION. BELOW IS JUST AN EXAMPLE. */
jjb_setup() {
/* use the set( function below to show you the JJB setup */
/* set(SHOWSETUP_SW,T); */
group("File");
option("Access");
option("Update file");
option("Merge");
option("Copy");
option("Copy and Mer'g'e ",DRAWLINE);
option("Create file",DRAWLINE);
option("List");
option("List 'P'artially",DRAWLINE);
option("Text search");
option("Replace text");
group("Enter");
option("Master records F4");
option("Activity",DRAWLINE);
option("Anything you want for any application");
option("Special report descriptions F5");
option("Special 'K'eys",DRAWLINE);
option("Setup configuration");
option("Color selections");
group("Reports");
option("Daily reports");
option("Monthly");
option("Annual",DRAWLINE);
option("Special 'F'oken reports");
option("Activity 'J'ournals F6",DRAWLINE);
option("Send reports to asc file ",DRAWLINE);
option("Print all reports");
group("Other");
option("Press the ALT key now");
default_opt(); /* JJB will now default to above option */
option("This is just an option description");
option("It is stored in an array");
option("And placed on the screen");
option("For your user to use in selecting options");
option("You may assign function names to these descriptions");
option("which will be executed when you select the option");
option("JJB has over 30 arrays which it uses to maintain");
option("control over option selection and execution.");
}